package com.cloud.dao.consumetype;

import com.cloud.model.entity.consumetype.ConsumeType;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * <b><code>ConsumeTypeDao</code></b>
 * <p/>
 * ConsumeType的具体实现
 * <p/>
 * <b>Creation Time:</b> 2019-10-15 17:23:42.
 *
 * @author ${model.author}
 * @version 1.0.0
 * @since cloud-spring-boot-be 1.0.0
 */
@Repository
public interface ConsumeTypeDao extends JpaRepository<ConsumeType, Long>, JpaSpecificationExecutor<ConsumeType> {

    List<ConsumeType> findAllByEnabledAndTypeOrderByWeightDesc(Integer enabled, Integer type);
}
